package com.gzx.plugin.data.wxjk.sync.dao;

import com.gzx.plugin.data.wxjk.sync.pojo.SssjContactInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ContactInfoDao {

    @Insert("<script>" +
            "INSERT INTO data_wxjk_sssjContactInfo(" +
            "    business_id, " +
            "    contact_name, " +
            "    contact_tel, " +
            "    contact_ship, " +
            "    create_time, " +
            "    update_time" +
            ") VALUES " +
            "<foreach collection='list' item='item' separator=','>" +
            "    (" +
            "        #{item.businessId}, " +
            "        #{item.contactName}, " +
            "        #{item.contactTel}, " +
            "        #{item.contactShip}, " +
            "        NOW(), " +
            "        NOW()" +
            "    )" +
            "</foreach>" +
            "</script>")
    void batchSave(@Param("list") List<SssjContactInfo> list);
}
